package mygang.service.manager;

import java.util.List;
import mygang.dao.manager.ManagerInterface;
import mygang.service.AbstractService;

/**
 *
 * @author Volodymyr Lavrynovych <volodya.lavrynovych@gmail.com>
 * date: 25/02/2013
 */
public class AbstractManageService<D extends ManagerInterface, T> extends AbstractService<D> implements ManagerInterface<T> {
    public List<T> getAll() {
        return getDao().getAll();
    }

    public void save(T obj) {
        getDao().save(obj);
    }

    public void delete(long id) {
        getDao().delete(id);
    }

    public T getById(long id) {
        return (T) getDao().getById(id);
    }
}